<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.service.security.entity.BankEntity"%>
<%@page import="com.blockchain.front.servlets.financial.GdList"%>
<%@page import="com.blockchain.front.servlets.financial.UpdateGd"%>
<%@page import="com.blockchain.front.service.common.entity.GdEntity"%>
<%@page import="com.blockchain.front.service.financial.GdManage"%>
<%@page import="com.blockchain.common.enums.GdState"%>
<%@page import="com.blockchain.front.servlets.financial.Wygd"%>
<%@page import="com.blockchain.front.service.financial.entity.RechargeQrEntity"%>
<%@page import="com.blockchain.front.servlets.financial.Charge"%>
<%@page import="java.util.Random"%>
<%@page import="java.text.DecimalFormat"%>
<%@page import="com.blockchain.common.enums.ChargeStatus"%>
<%@page import="com.blockchain.common.enums.ChargeType"%>
<%@page import="com.blockchain.front.servlets.financial.CnyTx"%>
<%@page import="com.blockchain.front.service.financial.entity.TxRecordEntity"%>
<%@page import="com.blockchain.common.enums.WithdrawStatus"%>
<%@page import="com.blockchain.front.servlets.security.Bank"%>
<%@page import="com.blockchain.front.service.security.entity.BankCard"%>
<%@page import="com.blockchain.front.service.financial.entity.UserZhEntity"%>
<%@page import="com.blockchain.front.servlets.SendVice"%>
<%@page import="com.blockchain.front.servlets.Send"%>
<%@page import="com.blockchain.front.servlets.security.Qbbz"%>
<%@page import="com.blockchain.front.service.financial.entity.XlbEntity"%>
<%@page import="com.blockchain.util.http.URLParameter"%>
<%@page import="com.blockchain.front.servlets.financial.AbstractFinancialServlet"%>
<%@page import="com.blockchain.front.service.AbstractFrontService"%>
<%@page import="com.blockchain.front.servlets.AbstractFrontServlet"%>
<%@page import="com.blockchain.front.service.financial.entity.JlEntity"%>
<%@page import="com.blockchain.common.enums.JyztStatus"%>
<%@page import="com.blockchain.front.service.security.entity.QbdzEntity"%>
<%@page import="com.blockchain.front.service.security.SecurityManage"%>
<%@page import="com.blockchain.front.service.financial.FinancialManage"%>
<html>
<head>
<%
String str = languageDefine.getValue(request, "eurRecharge_eurRecharge");
String _TITLE_ = str + "- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="RMBJY";
PC_TITLE_NAME="RMBJY";
URLParameter parameter = new URLParameter(request,controller.getViewURI(request,Wygd.class));
SecurityManage securityManage = serviceSession.getService(SecurityManage.class);
GdState zt=EnumParser.parse(GdState.class, request.getParameter("zt"));
GdManage manage=serviceSession.getService(GdManage.class);
BankEntity[] banks=securityManage.getBank(); 
BankCard[] bs=securityManage.bankList();
final int currentPage = IntegerParser.parse(request.getParameter("paging.current"));
 PagingResult<GdEntity> searchJl=manage.searchJl(zt,new Paging() {
	public int getCurrentPage() {
		return currentPage;
	}

	public int getSize() {
		return 5;
	}
});
 GdEntity[] search=searchJl.getItems(); //列表  
 BigDecimal min=BigDecimalParser.parse(configureProvider.getProperty(SystemVariable.CHARGE_MIN_AMOUNT));
%> 	
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<div class="autobox">
    <div class="now">
         <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_home")%></a> &gt; <a href="<%=controller.getViewURI(request,com.blockchain.front.servlets.financial.index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_financeCenter")%> </a> &gt; <%=languageDefine.getValue(request, "eurRecharge_eurRecharge")%>
    </div>
    <div class="assets_center clear po_re zin70">
        <!--左侧菜单-->
        <div class="coin_menu">
    <div class="coin_menu_box">
        <ul>
            <li id="finance_index"><i class="coin_menu_op_0_1"></i><%=languageDefine.getValue(request, "financial_wygd")%></li>
        </ul>
    </div>
     <%@include file="/WEB-INF/include/financial/left.jsp"%>	
</div>
        <!--右侧内容-->
        <div class="assets_content w900 right bg_w">
            <div class="safe_center clear" style="padding-left: 0px;">
            <br>
           <form action="<%=controller.getURI(request, Wygd.class)%>" method="post" id="form" >
            <div class="choosepaymethod">
                 <a href="<%=controller.getViewURI(request, GdList.class)%>" style="cursor:pointer;" class="wycz_cz"><%=languageDefine.getValue(request, "financial_gdlb")%></a>
                 <a href="<%=controller.getViewURI(request, Wygd.class)%>" style="cursor:pointer;" class="wycz_cz active"  id="outline"><%=languageDefine.getValue(request, "financial_tjgd")%></a>
                
                <div class="choosebanks"  id="JKDiv_1">
                    <div id="czxx" class="methodway clearfix" style="padding-top:18px;display:block;" >
                    	<div class="w_div clearfix">
                            <div class="w1"><%=languageDefine.getValue(request, "financial_gdsl")%>：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" id="gdsl" name="gdsl" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1"><%=languageDefine.getValue(request, "financial_gddj")%>：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" id="gddj" name="gddj" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1">最小成交数量：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" id="zxcjsl" name="zxcjsl" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1"><%=languageDefine.getValue(request, "financial_zffs")%>：</div>
                            <div class="w2">
                                <select id="zftype" class="mycz-type" name="zftype"  style="width: 200px; height: 38px;border-radius: 8px;" onchange="showyh()">
                                    <option value="ZFB"><%=languageDefine.getValue(request, "financial_zfb")%></option>
                                    <option value="WX"><%=languageDefine.getValue(request, "financial_wx")%></option>
                                    <option value="YHK"><%=languageDefine.getValue(request, "financial_yhk")%></option>
                                </select>
                            </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1">收款人姓名：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" name="khxm" id="khxm" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        <!-- 银行卡属性 -->
                        <div id="isyh" style="display:none;">
                        <div class="w_div clearfix">
                            <div class="w1"><%=languageDefine.getValue(request, "bankCarManagement_bank")%>：</div>
                            <div class="w2">
                                <input class="cztxinput" type="text" name="yhmc" id="yhmc" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                                <span class="controls" id="city_1">
       							<select class="prov" id="bank_bankprov" name="sheng" style="width: 110px;"></select>
      							<select class="city" id="bank_bankcity" name="shi" style="width: 110px; display: none;"></select>
      							</span>
                            </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1">支行名称：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" name="zhmc" id="zhmc" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1"><%=languageDefine.getValue(request, "financial_skzh")%>：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" id="skzh" name="skzh" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        <div class="w_div clearfix">
                            <div class="w1"><%=languageDefine.getValue(request, "financial_lxdh")%>：</div>
                            <div class="w2">
                               <input class="cztxinput" type="text" id="lxdh" name="lxdh" value="" placeholder="" style="width:160px;padding-right:30px;border-radius: 8px;text-align:right;" >
                            </div>
                        </div>
                        <div class="w_div clearfix" >
                            <div class="w1">&nbsp;</div>
                            <div class="w2">
                                <input type="button"  class="btn-cztx" id="btn-submit" value='<%=languageDefine.getValue(request,"financial_tjgd")%>' onclick="Update();" style="border-radius: 8px;">
                            </div>
                        </div>
                    </div>
                    <div id="dialog_ali" class="" style="width: 650px; overflow: visible; display:none;position:relative;">
                        <div class="mana-app-title" style="line-height: 34px;"><%=languageDefine.getValue(request, "rmbRecharge_onlineBankRemittance")%> 
                        <span id="wait" style="color:#e55600;">（<%=languageDefine.getValue(request, "rmbRecharge_unpaid")%>）</span>
                        </div>
                        <div style="clear: both"></div>
                        <div class="pay_con">
                            <span></span>
                        </div>
                    </div>
                </div>
        </div>
                <div class="f_body">
                    <table class="f_table" id="investLog_content">
                        <thead>
                        <tr>
                        	<th width=""><%=languageDefine.getValue(request,"financial_lsh")%></th>
                        	<th width=""><%=languageDefine.getValue(request,"financial_gdsj")%></th>
                            <th width=""><%=languageDefine.getValue(request,"financial_gdsl")%></th>
                            <th width=""><%=languageDefine.getValue(request,"financial_gddj")%></th>
                            <th width="">剩余数量</th>
                            <th width=""><%=languageDefine.getValue(request,"financial_zffs")%></th>
                            <th width=""><%=languageDefine.getValue(request,"financial_lxdh")%></th>
                            <th width="">
                            <select name="zt" id="status-selectTest">
                            <option  value=""><%=languageDefine.getValue(request, "rmbRecharge_status")%></option>
                            <%for(GdState zs:GdState.values()){
                            	if(zs == GdState.GDZ || zs == GdState.DSH){
                            	%>
                                <option <%if(zs.name().equals(String.valueOf(zt))){%> selected="selected"<%}%> value="<%=zs.name()%>"><%=backgroundDataFlag==1?zs.getName():backgroundDataFlag==2?zs.getNameEn():zs.getNameTw()%></option>
                             <%}}%>
                            </select></th>
                        </tr>
                        </thead>
                        <tbody>
                  <%if(search!=null){for(GdEntity s:search){%> 
            <tr>
            	<td><%=s.id%></td>
                <td><%=DateTimeParser.format(s.gdsj,"yyyy-MM-dd HH:mm")%></td>
                <td><%=Formater.formatAmount(s.gdsl)%></td>
                <td><%=Formater.formatAmount(s.gddj)%></td>
                <td><%=Formater.formatAmount(s.sysl)%></td>
                <td><%=backgroundDataFlag==2?s.zfType.getName():backgroundDataFlag==1?s.zfType.getNameEn():s.zfType.getNameTw()%></td>
                <td><%StringHelper.filterHTML(out, s.lxdh);%></td>
                <td><a href="<%=controller.getURI(request, UpdateGd.class)%>?id=<%=s.id%>">详情</a></td>
            </tr>
            <%}}%>
                  </tbody>
                    </table>
                   <%AbstractFinancialServlet.rendPaging(out, searchJl,controller.getPagingURI(request,Wygd.class),parameter.getQueryString());%>
                </div>
                </form>
            </div>
    </div>
</div>
</div>
<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/js/cityselect.js"></script>
<script type="text/javascript">
$("#city_1").citySelect({nodata:"none",required:false});
var min=<%=min%>;
 $("#status-selectTest").change(function () {
	$("#form").attr("action",'<%=controller.getViewURI(request, Wygd.class)%>');	
	$("#form").submit();
});
 function showyh(){
	 var opt=$("#zftype").val();
	 if (opt=="YHK"){
		 $("#isyh").show();	
	 }else{
		 $("#isyh").hide();
	 }
 }
	function Update() {
		var gdsl = $("#gdsl").val();
		var gddj = $("#gddj").val();
        var zftype = $('#zftype option:selected').val();
        var skzh = $("#skzh").val();
        var lxdh = $("#lxdh").val();
        if (gdsl == "" || gdsl == null) {
            layer.tips('<%=languageDefine.getValue(request,"financial_lxdh")%>', '#gdsl', {tips: 3});
            return false;
        }
        if (gddj == "" || gddj == null) {
            layer.tips('<%=languageDefine.getValue(request,"financial_err_dj")%>', '#gddj', {tips: 3});
            return false;
        }
        if (skzh == "" || skzh == null) {
            layer.tips('<%=languageDefine.getValue(request,"financial_err_zh")%>', '#skzh', {tips: 3});
            return false;
        }
        if (lxdh == "" || lxdh == null) {
            layer.tips('<%=languageDefine.getValue(request,"financial_err_dh")%>', '#lxdh', {tips: 3});
            return false;
        }
        if(zftype=="YHK"){
        	var yhmc = $("#yhmc").val();
        	if (yhmc == "" || yhmc == null) {
                layer.tips('银行名称不能为空', '#yhmc', {tips: 3});
                return false;
            }
        	var zhmc = $("#zhmc").val();
        	if (zhmc == "" || zhmc == null) {
                layer.tips('支行名称不能为空', '#zhmc', {tips: 3});
                return false;
            }
        }
    	var khxm = $("#khxm").val();
    	if (khxm == "" || khxm == null) {
            layer.tips('开户姓名不能为空', '#khxm', {tips: 3});
            return false;
        }
        $("#form").submit(); 
        
	   }
	   
	function myczHuikuan(){
		$("#dialog_ali").hide();
		$("#czxx").show();	
	}
	
	
<%String error = controller.getPrompt(request,response,PromptLevel.ERROR);if(!StringHelper.isEmpty(error)){%>
	layer.open({
	title: '<%=languageDefine.getValue(request, "js_tip")%>',
	content: '<%=languageDefine.getValue(request,error)%>'
});  
<%}%>

<%String info = controller.getPrompt(request,response,PromptLevel.INFO);if(!StringHelper.isEmpty(info)){%>
$("#dialog_ali").show();
$("#czxx").hide();
<%}%>

</script>
</body>
</html>	
	
